<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>jquery-tmpl演示</title>
    <#include  "/include/common.ftl">
    <script type="text/javascript" src="/assets/lib/jquery-tmpl/jquery.tmpl.js"></script>
</head>
<body>
<div id="div_demo">
</div>
<script id="demo" type="text/x-jquery-tmpl">
    <div style="margin-bottom:10px;">
    　　<span>{{= ID}}</span>
    　　<span style="margin-left:10px;">{{= Name}}</span>
    　　<span style="margin-left:10px;">{{= Number(Num)+1}}</span>
    　　<span style="margin-left:10px;">{{= Status}}</span>
    </div>
</script>
</body>
<script type="text/javascript">
    var users = [{ ID: 'think8848', Name: 'Joseph Chan', Num: '1', Status: 1 },
        { ID: 'aCloud', Name: 'Mary Cheung', Num: '2'}];

    $("#demo").tmpl(users).appendTo('#div_demo');
</script>
</html>